package com.castday2.castday2.test;

import com.castday2.castday2.bean.Student;
import com.castday2.castday2.mapper.StudentMapper;
import com.castday2.castday2.mapper.UserMapper;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;

import java.util.List;
/**
 * @Author : 徐闯 mpcast
 * @Date : 2021-05-24 21:05:17
 * @Description : 逻辑删除demo
 **/
@RunWith(SpringRunner.class)
@SpringBootTest
public class F_LogicDelete {
    @Autowired
    private StudentMapper studentMapper;
    @Test
    public void test(){
        int n = studentMapper.deleteById(1);
        System.out.println(n);
    }
    @Test
    public void test2(){
        List<Student> list = studentMapper.selectList(null);
        list.forEach(System.out::println);
    }
}